package org.apache.ibatis.common.reflection.wrapper;

import org.apache.ibatis.common.reflection.MetaObject;
import org.apache.ibatis.common.reflection.ReflectorException;

/**
 * @Name DefaultObjectWrapperFactory
 * @Description: 对象（集合）包装器生产工厂 [默认实现] 类
 * @Version v1.0.0
 * @Author: lichao
 * @Date: 2024-04-28 14:13:24
 **/
public class DefaultObjectWrapperFactory implements ObjectWrapperFactory {
    @Override
    public boolean hasObjectWrapperFor(Object object) {
        return false;
    }

    @Override
    public ObjectWrapper getObjectWrapperFor(MetaObject metaObject, Object object) {
        String errorMsg = "对象（集合）包装器生产工厂默认实现类不应该被调用去生产或提供一个对象（集合）包装实例。";
        throw new ReflectorException(errorMsg);
    }
}

